<template>
  <PublicSearch>
    <n-form
        ref="formRef"
        :model="formValue"
        :inline="true"
        label-placement="left"
        :label-width="80">
      <n-grid
          x-gap="12"
          :cols="3">
        <n-gi>
          <n-form-item label="菜单名称" path="menuName">
            <n-input v-model:value="formValue.menuName" placeholder="请输入菜单名称" clearable />
          </n-form-item>
        </n-gi>
        <n-gi>
          <n-form-item label="状态" path="status">
            <n-select v-model:value="formValue.status" clearable :options="statusDict" />
          </n-form-item>
        </n-gi>
        <n-gi>
          <n-space style="padding-left:10px;padding-bottom:10px;">
            <n-button type="primary" attr-type="button" @click="onSubmit">搜索</n-button>
            <n-button attr-type="button" @click="onReset">重置</n-button>
          </n-space>
        </n-gi>
      </n-grid>
    </n-form>
  </PublicSearch>
</template>
<script setup >
import PublicSearch from "@/components/public/PublicSearch.vue"
import {ref} from "vue";
const emit = defineEmits({
  search:null
})
const onSubmit = () =>{
  emit('search')
}
const onReset = () =>{

}
const formValue = ref({
  menuName:"",
  status: undefined
});
defineExpose({
  searchParam:formValue
})
const statusDict = ref();
</script>
<style lang="scss" scoped>
.query-form {
  margin-top: 20px;
}
</style>